<!DOCTYPE html>
<html>

<head>
    <title>选择具有title属性的元素</title>
    <style>
        [title] {
            color: blue;
        }
    </style>
</head>

<body>
    <h2>Will apply to:</h2>
    <h1 title="Hello world">Hello world</h1>
    <a title="runoob.com" href="http://www.runoob.com/">runoob.com</a>
    <hr>
    <h2>Will not apply to:</h2>
    <p>Hello!</p>
</body>

</html>